import http from '../request.js'

// 档案模板配置列表查询
let getArchivesList = (url, params) => {
    return http.req(
        'get',
        url = 'synth/archives/getList',
        params,
        null
    )
}

// 获取档案模板配置信息
let getArchivesInfo = (url,archivesId) => {
    return http.req(
        'get',
        url = 'synth/archives/getInfo?archivesId='+archivesId,
        null,
        null
    )
}

// 综合档案模板配置信息内容信息配置列表
let getArchivesContentConfigList = (url) => {
    return http.req(
        'get',
        url = 'synth/archivesContentConfig/getList',
        null,
        null
    )
}

// 添加档案模板配置信息
let addArchives = (url,data) => {
    return http.req(
        'post',
        url = 'synth/archives/add',
        null,
        data
    )
}

// 使用档案模板配置
let useArchives = (url,archivesId) => {
    return http.req(
        'post',
        url = 'synth/archives/use?archivesId='+archivesId,
        null,
        null
    )
}

// 取消使用档案模板配置
let cancelUseArchives = (url,archivesId) => {
    return http.req(
        'post',
        url = 'synth/archives/cancelUse?archivesId='+archivesId,
        null,
        null
    )
}

// 删除档案模板配置信息
let removeArchives = (url,archivesId) => {
    return http.req(
        'delete',
        url = 'synth/archives/remove?archivesId='+archivesId,
        null,
        null
    )
}

// 修改档案模板配置信息
let editArchives = (url,data) => {
    return http.req(
        'put',
        url = 'synth/archives/edit',
        null,
        data
    )
}

export default {
    getArchivesList,
    getArchivesInfo,
    getArchivesContentConfigList,
    addArchives,
    useArchives,
    cancelUseArchives,
    removeArchives,
    editArchives
}
